
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_plugin_demo2_example/utils/screen_utils.dart';

class ShowNativePage extends StatelessWidget {
  const ShowNativePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    const String viewType = 'native_view_show';
    // final Map<String, dynamic> tempcreationParams = <String, dynamic>{
    //   "key": "~~native",
    // };

    // print("tempcreationParams = $tempcreationParams");
    return Container(
      width: ScreenUtils.getScreeenWidth(context),
      height: ScreenUtils.getScreeenHeidth(context),
      alignment: Alignment.center,
      color: Colors.white,
      child: defaultTargetPlatform == TargetPlatform.android ? Container() : UiKitView(
        viewType: viewType,
        layoutDirection: TextDirection.ltr,
        creationParams: {
          "key": "~~native",
        },
        creationParamsCodec: const StandardMessageCodec(),

      ),
    );
  }
}

